public class Test {
    public static void main(String[] args){
        float sum=0;
        int f=1;
        for(float i=1.0f;i<=100;i++){
            sum+=(1/i*f);
            f=-f;
        }
        System.out.println(sum);
    }
}
